for i in range(100,1000):
    A=i//100
    B=i//10%10
    C=i%10
    if i==A**3+B**3+C**3:
       print(i)